<html>
    
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Hybrid</title>
        <style>
            p{
                text-align: center;
                display: inline-block;
                width: 50%;
            }
        </style>
    </head>
    
    <body>
        <p id="start">心跳吧，baby</p><p id="stop">暂停</p>
        <audio id="musicid" src="music.mp3" preload="preload" autoplay="autoplay"  loop="loop">您的浏览器不支持 audio标签。</audio>
    </body>
    <script src="http://cdn.bootcss.com/jquery/3.2.1/jquery.js"></script>
    <script>
        
        document.querySelector("#start").onclick = function(){
            try {
                var result =  Hybrid.heartBreaker();
                alert("💗" + Hybrid.message + "💗");
            } catch (error) {
                console.log(error);
            }
        }
    
    document.querySelector("#stop").onclick = function(){
        try {
            Hybrid.stopHeart();
            
            
        } catch (error) {
            console.log(error);
        }
    }
    
    document.addEventListener('DOMContentLoaded', function () {
                              function audioAutoPlay() {
                              var audio = document.getElementById('musicid');
                              audio.play();
                              }
                              audioAutoPlay();
                              });
        </script>
    
</html>
